package co.fitstart.entity.finance;

import com.demo2do.core.utils.Alias;

/**
 * 
 * @author dan
 *
 */
@Alias("receiptType")
public enum ReceiptType {
    
    DEPOSIT("deposit", "49", "定金"),
    
    BALANCE("balance", "49", "尾款"),
    
    REFUND("refund", "47", "退款");
    
    private String alias;
    
    private String billType;
    
    private String description;
    
    private String type;
    
    private ReceiptType(String alias, String code, String description) {
        this.alias = alias;
        this.billType = code;
        this.description = description;
    }
    
    /**
     * 
     * @param alias
     * @return
     */
    public static ReceiptType aliasOf(String alias) {
        for (ReceiptType receiptType : ReceiptType.values()) {
            if (receiptType.getAlias().equalsIgnoreCase(alias)) {
                return receiptType;
            }
        }
        
        return null;
    }
    
    /**
     * @return the alias
     */
    public String getAlias() {
        return alias;
    }
    
    /**
     * 
     * @return
     */
    public String getBillType() {
        return billType;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }
    
    /**
     * 
     * @return
     */
    public String getType() {
        return type;
    }

    /**
     * @param alias the alias to set
     */
    public void setAlias(String alias) {
        this.alias = alias;
    }
    
    /**
     * 
     * @param billType
     */
    public void setBillType(String billType) {
        this.billType = billType;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }
    
    /**
     * 
     * @param type
     */
    public void setType(String type) {
        this.type = type;
    }

}
